package com.js.service.bot.response.impl;

import com.js.common.annotation.ResponseClass;
import com.js.domian.entity.bot.ResponseEntity;
import com.js.domian.model.bot.analysis.MessageChain;
import com.js.service.bot.response.BaseService;
import org.springframework.stereotype.Service;

@Service
@ResponseClass("网络图片")
public class WebImageService implements BaseService {

    @Override
    public MessageChain buildMessage(Long groupId, Long userId, String message, ResponseEntity response) {
        MessageChain msg = new MessageChain();
        if("1".equals(response.getAt())){
            msg.at(userId);
        }
        msg.image(response.getContent());
        return msg;
    }
}
